<template>
<!-- 审核详情 -->
  <div class="vehicleDetail">
    <el-card shadow="never" style="margin-top: 30px">
      <div class="header">
        <div class="page-header">
          <el-page-header @back="goBack" content="审核详情" style="margin-bottom: 20px">
          </el-page-header>
        </div>
      </div>

      <div class="vehicleForm">
        <el-form :disabled="true" :model="vehicleForm" ref="vehicleForm" label-width="120px" class="demo-ruleForm" size="mini">
          <el-form-item label="车主姓名" prop="veName">
            <el-input v-model="vehicleForm.veName"></el-input>
          </el-form-item>
          <el-form-item label="电话号码" prop="veName">
            <el-input v-model="vehicleForm.userPhone"></el-input>
          </el-form-item>
          <el-form-item label="业务类型" prop="veType">
            <el-input v-model="vehicleForm.veType"></el-input>
          </el-form-item>
          <el-form-item label="车牌号" prop="veNumber">
            <el-input v-model="vehicleForm.veNumber"></el-input>
          </el-form-item>
          <el-form-item label="申请时间" prop="veTime">
            <el-input v-model="vehicleForm.veTime"></el-input>
          </el-form-item>
          <el-form-item label="审核意见" prop="approStatus">
            <el-input v-model="vehicleForm.approStatus"></el-input>
          </el-form-item>
          <el-form-item label="审核备注" prop="approNote">
            <el-input type="textarea" v-model="vehicleForm.approNote" ></el-input>
          </el-form-item>
          <el-form-item label="审核时间" prop="approStatus">
            <el-input v-model="vehicleForm.approTime"></el-input>
          </el-form-item>
        </el-form>
      </div>

    </el-card>
  </div>
</template>

<script>
import {getVehicleOneByVeApproId} from "@/api/allApi";
import moment from "moment";

export default {
  name: "index",
  data(){
   return {
     vehicleForm:{},
   }
  },
  methods: {
    goBack() {
      this.$router.back();
    },
    getVehicleOneByVeApproId(){
      getVehicleOneByVeApproId(this.$route.params.veApproId).then(res=>{
          this.vehicleForm = res.data.data
        if (this.vehicleForm.approStatus == 1){
          this.vehicleForm.approStatus = "通过"
        }else if (this.vehicleForm.approStatus == 0){
          this.vehicleForm.approStatus = "不通过"
        }
        this.vehicleForm.veTime = moment(this.vehicleForm.veTime).format("YYYY-MM-DD HH:mm:ss")
        this.vehicleForm.approTime = moment(this.vehicleForm.approTime).format("YYYY-MM-DD HH:mm:ss")
      })
    },
  },
  mounted() {
    this.getVehicleOneByVeApproId()
  }
}
</script>

<style lang="less" scoped>
.vehicleForm {
  width: 800px;
  padding: 30px;

}
</style>